package com.pcbly.web.bean.system;

import java.util.HashSet;
import java.util.Set;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.pcbly.web.bean.AbstractBaseBean;

/**
 * @author cac
 */
public class ResourceBean extends AbstractBaseBean {

    // Fields


    /**
	 * 
	 */
	private static final long serialVersionUID = 8087960400252756864L;

	private String name;

    private ModuleBean module;

    private String resType;

    private String resString;

    private String descn;

    private Set<AuthorityBean> permissions = new HashSet<AuthorityBean>(0);

    private String authorize;

    public ResourceBean(){
    	
    }
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getResType() {
        return this.resType;
    }

    public void setResType(String resType) {
        this.resType = resType;
    }

    public String getResString() {
        return this.resString;
    }

    public void setResString(String resString) {
        this.resString = resString;
    }

    public String getDescn() {
        return this.descn;
    }

    public void setDescn(String descn) {
        this.descn = descn;
    }

    public Set<AuthorityBean> getPermissions() {
        return this.permissions;
    }

    public void setPermissions(Set<AuthorityBean> permissions) {
        this.permissions = permissions;
    }

    public String getAuthorize() {
        return authorize;
    }

    public void setAuthorize(String authorize) {
        this.authorize = authorize;
    }

    public ModuleBean getModule() {
        return module;
    }

    public void setModule(ModuleBean module) {
        this.module = module;
    }
    /**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		return EqualsBuilder.reflectionEquals(this, object);
	}

	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return HashCodeBuilder.reflectionHashCode(this);
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return ToStringBuilder.reflectionToString(this,ToStringStyle.MULTI_LINE_STYLE);
	}
}